package com.haixiaoke.flat.auth.ali;

import com.haixiaoke.saas.auth.ali.service.AliAuthService;
import com.haixiaoke.saas.common.core.domain.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author qixi
 * @date 2024/6/4
 */
@RestController
@RequestMapping("/front/flat/auth/ali")
public class FlatAliAuthController {

    @Autowired
    private AliAuthService aliAuthService;


    /**
     * 三要素验证
     */
    @PostMapping("/threeFactor")
    public AjaxResult threeFactor(@RequestParam("name") String name,
                                  @RequestParam("cardNumber") String cardNumber,
                                  @RequestParam("ossIdFaceUrl") String ossIdFaceUrl) {
        return aliAuthService.faceAuth(name, cardNumber, ossIdFaceUrl);
    }
}
